package com.vehicle.repair.repository;

import com.vehicle.repair.model.User;
import com.vehicle.repair.model.Vehicle;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

public interface VehicleRepository extends JpaRepository<Vehicle, Integer> {
    List<Vehicle> findByOwner(User owner);
    
    Optional<Vehicle> findByPlateNumber(String plateNumber);
    
    boolean existsByPlateNumber(String plateNumber);
}
